<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>隐蔽遮罩</title>
    <style>
        .boss{
            position: relative;
            width: 444px;
            height: 320px;
            background-color: pink;
            margin: 30px auto;
        }
        .boss>img{
            width: 100%;
            height: 100%;
        }
        .mask{
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, .4) url(pic05.jpg) no-repeat center;
            background-size: 100px 100px;
        }
        /* 鼠标经过盒子，让mask显示出来 */
        .boss:hover .mask{
            display: block;
        }
    </style>
</head>
<body>
    <div class="boss"> 
        <div class="mask"></div>
        <img src="index_26.jpg" width="100%" height="100%">
    </div>
</body>
</html>